/*
 * @Author: WangRui
 * @Date: 2019-12-07 14:51:37
 * @LastEditors: WangRui
 * @LastEditTime: 2019-12-07 14:57:27
 * @Description: file content
 */
import BaseModel from "./baseModel";
import qs from 'qs'


const api = {
    login: '/parkuser/login',
}

export default class ParkModel extends BaseModel {
    constructor() {
        super()
        this._instance = null
    }

    static getInstance() {
        if (!this._instance) {
            this._instance = new ParkModel()
        }
        return this._instance;
    }

    login(userName, password) {
        return this.http.post(
            api.login,
            qs.stringify({ userName, password })
        )
    }
}